<?php 

Class Sql_notaventa {
	
	function __construct(){
		
	}
	
	
	public function Sql_getCorrelativo(){
		$sSql="
        SELECT
            CASE
        		WHEN max(not_convenio) IS NULL THEN  1
        		ELSE (max(not_convenio)+1)
        	END as not_convenio
        FROM
            bd_ratacom_dev.not_notaventa
        ";
	
		return $sSql;
	}
	
	
	
}

